#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
void handler(int signum)
{
    if(signum == SIGIO)
    {
        printf("SIGIO signal: %d\n",signum);
    }else if(signum == SIGUSR1)
    {
        printf("SIGUSR1 signal: %d\n",signum);
    }else{
        printf("nuknow signal\n");
    }
    return;
}

int main()
{
    signal(SIGIO,handler);
    signal(SIGUSR1,handler);
    printf("%d  %d\n",SIGIO,SIGUSR1);
    while(1)
    {
        sleep(1000);
    }
    return 0;
}
